<?php
$pros = [];
for ($i=0; $i < 10; $i++) {
    $process = new swoole_process(function ($pro) use ($i) {
       $pro->name("child progress===={$i}");
       echo $pro->pop();
    },false);
    $process->name("master child");
    $process->useQueue();
    $pid = $process->start();
    $pros[$pid] = $process;
}

foreach ($pros as $pid => $pro) {
     $pro->push("child progress====pid".$pro->pid.PHP_EOL);
     swoole_process::wait();
}